home *** CD-ROM | disk | FTP | other *** search
/ The Learning Curve / The Learning Curve (Weird Science, 1996).iso / mathematics / maths programs / eqnsolver / eqnsolver.doc < prev    next >
Encoding:
Text File  |  1986-08-04  |  10.5 KB  |  330 lines

  1.  
  2.  
  3.  
  4.                                 Eqn Solver V 1.0
  5.  
  6.                                       by
  7.  
  8.                                   John Ogden
  9.  
  10.                                      1994
  11.  
  12.                                   User Manual
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.                                 Contents
  22.  
  23.  
  24.                                Introduction
  25.  
  26.  
  27.  
  28.                             1) How to Change Equations
  29.  
  30.  
  31.                             2) Main Menu
  32.  
  33.  
  34.                             3) Interial Bisection
  35.  
  36.  
  37.                             4) Decimal Search
  38.  
  39.  
  40.                             5) Newton Raphson
  41.  
  42.  
  43.                             6) Iterative method
  44.  
  45.  
  46.                             7) The Grapher
  47.  
  48.  
  49.                             8) The setup Page
  50.  
  51.  
  52.                             9) How the methods work
  53.  
  54.  
  55.                            10) Future Versions
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.                                Introduction
  68.  
  69.  
  70.  
  71. Eqn Solver is a handy little program,  written in Amos Professional, used for
  72. solving complicated equations that can  not  be  solved  in  the usual way or
  73. those which would take much too long to solve in the normal way (you can't be
  74. bothered to do it properly in  other  words),  it does not solve simultaneous
  75. equations.
  76. example.
  77.  
  78.   Sin x - Ln x + ( Cot x * Cosec x ) + 2 = 0
  79.  
  80. Would be a real pain to solve using mathematical theory, if you don't believe
  81. me try it, Eqn Solver will solve just about any equation that has real roots,
  82. it does not however find imaginary  roots, YET.
  83.  
  84. Eqn solver will also display a pretty picture of the graph of the equation.
  85.  
  86. Note: Eqn solver may not get the EXACT  root,  it will only get a pretty good
  87. estimate of the root.
  88.  
  89. This program can be used when  doing  coursework for pure maths module three,
  90. if numerical methods are on your A level syllabus.
  91. Eqn solver can use any one  of  four  algorithms to solve the equations these
  92. are :
  93.  
  94. Interial bisection
  95. Decimal Search
  96. Newton Raphson
  97. Iterative method.
  98.  
  99.  
  100.                             1) How to change the equation
  101.  
  102. To change an equation you will need  to  edit  the actual program, at this time
  103. this is un avoidable, sorry for any problems in doing this.
  104. 1) Look through the program  for  the  _EQN[X#]  procedure,  open this if it is
  105. closed by pressing F9.
  106. 2) Chose which equation you wish to alter, there are four as a default.
  107. 3) Delete everthing on the line after Def Fn F (X#) =
  108. 4) Type in your equation in here.
  109. 5) In the _DYDX[X#] procedure change the same equation number as you altered in
  110. step 3 and type in the differential of your new equation.
  111. 6) In the _XEQUALS[X#] procedure change the  same equation, but this time enter
  112. what X equals in the function.
  113.  
  114.  
  115.  
  116.  
  117.  
  118.                             2) Main Menu
  119.  
  120.  
  121. To select an option press the option's  number and then press the return key,
  122. for example to chose option number 3 press  the key with 3 printed on it then
  123. press the big grey key with the arrow  on  it,  do not type the word three to
  124. find out what the option number  is  look  at  the number next to the options
  125. name, it is the same.
  126. Spooky!    What a coincidence!    I bet it's aliens who did that !
  127.  
  128.  
  129.  
  130.  
  131.  
  132.                             3) Interial Bisection
  133. This method is similar to the decimal search, except it works in base two not
  134. 10.
  135. First you must enter the number of  itterations  you require, you can use any
  136. number between 1 and 28, arround 10 is usually enough.
  137. You must then enter the two X values,  one  at  each side of the root you are
  138. trying to find, if you are not  sure  which  values to chose you should check
  139. the graph of the equation.
  140. The program now checks to see if there  is  a root between the two points, if
  141. there is, the results will be displayed, if not you will be told and asked if
  142. you want to try again.
  143.  
  144.  
  145.  
  146.  
  147.  
  148.                             4) Decimal Search
  149.  
  150. First the program asks  how  many  itterations  (decimal places) you require,
  151. type in the number, you will then  be  asked  for the x position to start the
  152. search. The program then displays the results.
  153. Each decimal place will be displayed seperatley,  to  go on to the next place
  154. press any key.
  155.  
  156.  
  157.  
  158.  
  159.                             5) Newton Raphson
  160.  
  161.  
  162. You will be asked for the number of itterations you require, and then for the
  163. start X position, the program then displays the results.
  164.  
  165.  
  166.  
  167.  
  168.                             6) Iterative method
  169.  
  170.  
  171. You are asked for the number of itterations you require, then for the start x
  172. position, the results are then displayed.
  173.  
  174.  
  175.  
  176.  
  177.                             7) The Grapher
  178.  
  179.  
  180. The graph menu has 6 options to configure the graph to your needs, these are
  181.  
  182. X scale       The number of pixels in the graph per unit of the X axis
  183. Y scale       The number of pixels in the graph per unit of the Y axis
  184. X line        Along the X axis there  are  lines that tell you the scale this
  185.               tells the program how often to put them use 0 for no lines
  186. Y line        Same as X line except along the Y axis
  187. X axis        Tells the grapher where the X axis is, the default is 0.
  188. Y axis        Tells the program where the y axis is, default is 0
  189.  
  190.  
  191. Once the graph is drawn you can zoom  in  by  fifty percent by pressing the I
  192. key, To zoom out press the O key.
  193. To save the graph as a 2 colour interlaced hires iff picture press the s key
  194. To scroll arround the graph use the arrow keys.
  195. To leave the graph screen press the escape key
  196.  
  197.  
  198.                             8) The setup Page
  199. This lets you change the values of  everything,  and where the text files are
  200. saved,
  201. Load and save let you load and save the setup in a text file.
  202. Equation type is used to switch between the equations
  203.  
  204.  
  205.  
  206.                             9) How the Methods work
  207.  
  208.  
  209. How the methods work - Interial bisection
  210.  
  211. 1) This method inputs two initial values  of  x, it is presumed that you know
  212. that the is a root between the two points.
  213. 2) The mid point of these two values is then found.
  214. 3) These three values are then put into then equation you are trying solve.
  215. 4) The program then checks if the root  is  between the first x value and the
  216. mid point, or between the mid point and the second x value.
  217. 5) If it is between the first and  the  mid point, then the second x value is
  218. made equal to the mid point, and we go  back to stage 3, if not the root must
  219. be between the mid point and the second x value, so the first x value is made
  220. equal to the mid point and you go back to stage 3.
  221. 6) When you think that you have a good enough estimate of the root, you stop
  222.  
  223.  
  224.  
  225.  
  226.  
  227. How the methods work - Decimal search
  228.  
  229. 1) This method inputs an initial  X  value,  it  then  adds one to this value
  230. until the value of the  equation  changes  sign,  one  is then taken from the
  231. equation.
  232. 2) 0.1 is then added to the X  value  until the value of the equation changes
  233. sign.
  234. 3) 0.01 is added and so on until you have a good enough estimate of the root.
  235.  
  236.  
  237.  
  238.  
  239.  
  240. How the methods work - Newton raphson
  241.  
  242. This method was thought of by Isaac Newton and somebody called Raphson
  243. To understand how  it  works  you  need  to  understand  how to differentiate
  244. equations, if you don't, then use  another  method  or ask someone to explain
  245. how, basically it is a way of finding the gradient of a line,
  246.  
  247. 1) The method works by finding the equation of the tangent at point X.
  248. 2) You then find where this line cuts the X axis.
  249. 3) This point is your new X value, and you go back to stage 1
  250. 4) You repeat this as many times as you feel is needed.
  251.  
  252. Here is a short table of common differentials.
  253.  
  254.  --------------------------------------------------------------------
  255.  |  Expression           |   Differentiates to                      |
  256.  --------------------------------------------------------------------
  257.  |                       |                                          |
  258.  |  X squared            |    2 times X                             |
  259.  |  X cubed              |    3 times X squared                     |
  260.  |  A * X to the N       |    A * N * X to the N-1                  |
  261.  |  Sin X                |    Cos X                                 |
  262.  |  Cos X                |    -Sin X                                |
  263.  |  Tan X                |    Sec squared X                         |
  264.  |  Ln X                 |     1/X                                  |
  265.  |  e to the X           |    e to the X                            |
  266.  |  Sin X over X squared |    ( X * Cos X - 2 * Sin X ) / X Cubed   |
  267.  |  Any number           |    0                                     |
  268.  |                       |                                          |
  269.  --------------------------------------------------------------------
  270.  
  271.  
  272.  
  273.  
  274.  
  275. How the methods work - Iterative method
  276.  
  277. For this method you need to define  another  function,  G of X to do this re-
  278. arrange your initial equation to find an expression for X equals.
  279. 1) You input a value of X.
  280. 2) This value is put into G of X,
  281. 3) The value that is returned is put back into G of X
  282. 4) You repeat this process until you have a good estimate or get bored
  283. Note: this method usually diverges away from the root into infinity
  284.  
  285.  
  286.  
  287.  
  288.                             10 Future Additions
  289.  
  290.  
  291. A system where the  user  does  not  have  to  look  through the program, and
  292. manually define each function, this could  be  in  the form of a mouse driven
  293. calculator like device,  but  I  don't  know  how  to  turn  a  string into a
  294. function. If anybody does I would like  to  know how, please let me know, you
  295. will get a mention in this manual if you do!
  296.  
  297. The above Idea could be extended so  that  the user does not have to manually
  298. differentiate the equation.
  299.  
  300. The setup page  should  really  display  the  current  equation  and  not the
  301. equations number
  302.  
  303. Direct printer support added
  304.  
  305. A GUI needs adding to make the  interface  more user friendly, and slower and
  306. more complicated to use.
  307.  
  308. This manual should have been written in amiga guide format, but it isn't.
  309.  
  310. The method of putting the interval lines on the graphs axis needs improving.
  311.  
  312. A little program could  be  added  that  hacks  into  the  banks computer and
  313. credits the user's account with around £ 1,000,000,000, and is completely un-
  314. traceble except if John Major is using it, in which case if phones the police
  315. man or woman that is always  standing  outside  his  front door and around 50
  316. reporters from various paper and television  companies, then invites them all
  317. in for a quick coffee. Any ideas how to do this ?
  318.  
  319. If you have any comments, bug reports  (and preferably fixes) or you know how
  320. to turn strings into functions or you want to donate huge amounts of money to
  321. me let me know at
  322.  
  323.                            John Ogden
  324.                            68  Babylon Lane
  325.                            Anderton
  326.                            Chorley
  327.                            Lancashire
  328.                            England
  329.                            PR6 9NW
  330.